{extend name="admin@public/content"}

{block name="style"}
<style>
    .left_setting h3 {
        position: absolute;
        font-size: 16px;
        left: 30px;
    }
    .layui-form input[type=checkbox], .layui-form input[type=radio], .layui-form select {
        display: inline-block;
    }
    .showsell{
        margin-top: 9px;
    }
    .showsell input{
        margin-left:3px;
    }
</style>

{/block}
{block name="content"}
<form autocomplete="off" onsubmit="return false;" action="{:request()->url()}" data-auto="true" method="post"
      class='form-horizontal layui-form padding-top-20'>

    <div class="form-group">
        <label class="col-sm-2 control-label">
            AppName<br><span class="nowrap color-desc">程序名称</span>
        </label>
        <div class='col-sm-8'>
            <input name="app_name" required="required" title="请输入程序名称" placeholder="请输入程序名称"
                   value="{:sysconf('app_name')}" class="layui-input">
            <p class="help-block">当前程序名称，在后台主标题上显示</p>
        </div>
    </div>




    <div class="form-group">
        <label class="col-sm-2 control-label">
            AppVersion<br><span class="nowrap color-desc">程序版本</span>
        </label>
        <div class='col-sm-8'>
            <input name="app_version" required="required" title="请输入程序版本" placeholder="请输入程序版本"
                   value="{:sysconf('app_version')}" class="layui-input">
            <p class="help-block">当前程序版本号，在后台主标题上标显示</p>
        </div>
    </div>

    <div class="hr-line-dashed"></div>

    <div class="form-group">
        <label class="col-sm-2 control-label">
            SiteName<br><span class="nowrap color-desc">网站名称</span>
        </label>
        <div class='col-sm-8'>
            <input name="site_name" required="required" title="请输入网站名称" placeholder="请输入网站名称"
                   value="{:sysconf('site_name')}" class="layui-input">
            <p class="help-block">网站名称，显示在浏览器标签上</p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">
            Copyright<br><span class="nowrap color-desc">版权信息</span>
        </label>
        <div class='col-sm-8'>
            <input name="site_copy" required="required" title="请输入版权信息" placeholder="请输入版权信息"
                   value="{:sysconf('site_copy')}" class="layui-input">
            <p class="help-block">程序的版权信息设置，在后台登录页面显示</p>
        </div>
    </div>

    <div class="hr-line-dashed"></div>

    <div class="form-group">
        <label class="col-sm-2 control-label">
            Browser<br><span class="nowrap color-desc">浏览器图标</span>
        </label>
        <div class='col-sm-8'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{:sysconf('browser_icon')}"/>
            <input type="hidden" name="browser_icon" onchange="$(this).prev('img').attr('src', this.value)"
                   value="{:sysconf('browser_icon')}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-uptype="local" data-type="ico,png" data-field="browser_icon">上传图片</a>
            <p class="help-block">建议上传ICO图标的尺寸为128x128px，此图标用于网站标题前，<a href="http://www.favicon-icon-generator.com/"
                                                                       target="_blank">ICON在线制作</a></p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">
            Browser<br><span class="nowrap color-desc">logo图片</span>
        </label>
        <div class='col-sm-8'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{:sysconf('image_logo')}"/>
            <input type="hidden" name="image_logo" onchange="$(this).prev('img').attr('src', this.value)"
                   value="{:sysconf('image_logo')}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-uptype="local" data-type="png" data-field="image_logo">上传图片</a>
        </div>
    </div>


    <div class="form-group">
        <label class="col-sm-2 control-label">
            微信公众号二维码<br><span class="nowrap color-desc"></span>
        </label>
        <div class='col-sm-8'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{:sysconf('wechat_logo')}"/>
            <input type="hidden" name="wechat_logo" onchange="$(this).prev('img').attr('src', this.value)"
                   value="{:sysconf('wechat_log')}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-uptype="local" data-type="png,jpg" data-field="wechat_logo">上传图片</a>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">
            Miitbeian<br><span class="nowrap color-desc">网站备案</span>
        </label>
        <div class='col-sm-8'>
            <input name="miitbeian" title="请输入网站备案号" placeholder="请输入网站备案号" value="{:sysconf('miitbeian')}"
                   class="layui-input">
            <p class="help-block">网站备案号，可以在<a target="_blank" href="http://www.miitbeian.gov.cn">备案管理中心</a>查询获取</p>
        </div>

    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">
            app版本号<br><span class="nowrap color-desc">app版本号</span>
        </label>
        <div class='col-sm-8'>
            <input name="versionid" required="required" title="app版本号" placeholder="app版本号"
                   value="{:sysconf('versionid')}" class="layui-input">
            <p class="help-block">程序的版权信息设置，在后台登录页面显示</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">
            Android下载链接<br><span class="nowrap color-desc">Android下载链接下载链接</span>
        </label>
        <div class='col-sm-8'>
            <input name="android_app_download_link" required="required" title="Android下载链接下载链接" placeholder="Android下载链接下载链接"
                   value="{:sysconf('android_app_download_link')}" class="layui-input">
            <p class="help-block">程序的版权信息设置，在后台登录页面显示</p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">
            ios下载链接<br><span class="nowrap color-desc">ios下载链接下载链接</span>
        </label>
        <div class='col-sm-8'>
            <input name="ios_app_download_link" required="required" title="ios下载链接下载链接" placeholder="ios下载链接下载链接"
                   value="{:sysconf('ios_app_download_link')}" class="layui-input">
            <p class="help-block">程序的版权信息设置，在后台登录页面显示</p>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">
            热线电话<br><span class="nowrap color-desc">热线电话</span>
        </label>
        <div class='col-sm-8'>
            <input name="hot_phone" required="required" title="请输入热线电话" placeholder="请输入热线电话"
                   value="{:sysconf('hot_phone')}" class="layui-input">
            <p class="help-block">当前程序版本号，在后台主标题上标显示</p>
        </div>
    </div>


    <div class="form-group">
        <label class="col-sm-2 control-label">
            全价保养赠送积分<br><span class="nowrap color-desc">全价保养赠送积分</span>
        </label>
        <div class='col-sm-8'>
            <input name="give_integral" required="required" title="请输入全价保养赠送积分" placeholder="请输入全价保养赠送积分"
                   value="{:sysconf('give_integral')}" class="layui-input">
            <p class="help-block">当前程序版本号，在后台主标题上标显示</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">
            半价保养消耗积分<br><span class="nowrap color-desc">半价保养消耗积分</span>
        </label>
        <div class='col-sm-8'>
            <input name="spread_integral" required="required" title="半价保养消耗积分" placeholder="半价保养消耗积分"
                   value="{:sysconf('spread_integral')}" class="layui-input">
            <p class="help-block">当前程序版本号，在后台主标题上标显示</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">
            推广赠送积分<br><span class="nowrap color-desc">推广赠送积分</span>
        </label>
        <div class='col-sm-8'>
            <input name="share_spread_integral" required="required" title="推广赠送积分" placeholder="推广赠送积分"
                   value="{:sysconf('share_spread_integral')}" class="layui-input">
            <p class="help-block">当前程序版本号，在后台主标题上标显示</p>
        </div>
    </div>
    <div class="hr-line-dashed"></div>
    <div class="form-group">
        <label class="col-sm-2 control-label">
            contract<br><span class="nowrap color-desc">更新内容</span>
        </label>
        <div class='col-sm-4'>
            <textarea name="upgrade_content">{:sysconf('upgrade_content')}</textarea>
            <script>
                laydate.render({
                    elem: '#pdrs_exchange'
                    ,type: 'datetime'
                });
                require(['ckeditor'], function () {
                    var editor = window.createEditor('[name="upgrade_content"]');
                });
            </script>
        </div>

    </div>

    <div class="hr-line-dashed"></div>


    <div class="col-sm-4 col-sm-offset-2">
        <div class="layui-form-item text-center">
            <button class="layui-btn" type="submit">保存配置</button>
        </div>
    </div>

</form>
<script>
    //监听指定开关
    form.on('switch(switchTest)', function(data){
        layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
            offset: '6px'
        });
        layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
    });

</script>

{/block}